<div class="main-content">
    <h1><a name="{{classname}}"></a>{{classname}}</h1>

    {{#operations}}
        {{#operation}}
            <hr/>
            <h3 class="operation-heading"><a name="{{nickname}}"></a>{{ summary }}</h3>

            <p class="marked">{{description}}</p>

            {{#notes}}<p class="marked">{{notes}}</p>{{/notes}}

            <h4 class="section-heading">URL</h4>
            <code>{{basePath}}{{path}}</code>

            <h4 class="section-heading">HTTP Method</h4>
            <code>{{httpMethod}}</code>

            <h4 class="section-heading">Scope</h4>
            {{#vendorExtensions.x-scope}}
                <code>{{vendorExtensions.x-scope}}</code>
            {{/vendorExtensions.x-scope}}
            {{^vendorExtensions.x-scope}}
                <p>Scope not required</p>
            {{/vendorExtensions.x-scope}}

            <h4 class="section-heading">CURL Example</h4>
            {{#vendorExtensions.x-wso2-curl}}
                <div class="pre"><code class="bash">{{vendorExtensions.x-wso2-curl}}</code></div>
            {{/vendorExtensions.x-wso2-curl}}
            {{^vendorExtensions.x-wso2-curl}}
                <p>Not Available</p>
            {{/vendorExtensions.x-wso2-curl}}

            {{#vendorExtensions.x-wso2-request}}
                <div class="pointer" data-toggle="collapse" data-target="#request-{{operationId}}">
                    <h4 class="section-heading">
                        Sample Request
                            <span class="glyphicon glyphicon-collapse-down" aria-hidden="true"></span>
                    </h4>
                </div>
                <div id="request-{{operationId}}"class="pre collapse"><code class="json">{{vendorExtensions.x-wso2-request}}</code></div>
            {{/vendorExtensions.x-wso2-request}}

            <div class="pointer" data-toggle="collapse" data-target="#response-{{operationId}}">
                <h4 class="section-heading">
                    Sample Response
                    {{#vendorExtensions.x-wso2-response}}
                        <span class="glyphicon glyphicon-collapse-down" aria-hidden="true"></span>
                    {{/vendorExtensions.x-wso2-response}}
            </h4>
            </div>
            {{#vendorExtensions.x-wso2-response}}
                <div id="response-{{operationId}}" class="pre collapse"><code class="json">{{vendorExtensions.x-wso2-response}}</code></div>
            {{/vendorExtensions.x-wso2-response}}
            {{^vendorExtensions.x-wso2-response}}
                <p>Not Available</p>
            {{/vendorExtensions.x-wso2-response}}
            <h4 class="section-heading">Parameters</h4>
            <table class="table table-hover">
                <colgroup>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                    <col style="width: 40%;"/>
                    <col style="width: 10%;"/>
                    <col style="width: 20%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>Type</th>
                    <th>Name</th>
                    <th>Description</th>
                    <th>Schema</th>
                    <th>Default</th>
                </tr>
                </thead>
                {{#allParams}}
                    <tr>
                        <td class="parameter">
                            {{#isFormParam}}<span class="param-in">Form </span>{{/isFormParam}}
                            {{#isQueryParam}}<span class="param-in">Query </span>{{/isQueryParam}}
                            {{#isPathParam}}<span class="param-in">Path </span>{{/isPathParam}}
                            {{#isHeaderParam}}<span class="param-in">Header </span>{{/isHeaderParam}}
                            {{#isBodyParam}}<span class="param-in">Body </span>{{/isBodyParam}}
                        </td>
                        <td class="param-name">
                            <p>{{baseName}}</p>
                            <p class="param-required">
                                {{#required}}required{{/required}}
                                {{^required}}optional{{/required}}
                            </p>
                        </td>
                        <td>
                            <p class="param-description marked">{{description}}</p>
                            {{#isEnum}}
                                <p><b>Accepted values: </b></p>
{{#allowableValues}}{{#values}}
<code>{{.}}</code>
{{/values}}{{/allowableValues}}
                            {{/isEnum}}
                        </td>
                        <td>
                            <span class="param-type">
                                {{dataType}}
                                {{#baseType}}
                                    (<a href="#!/models#{{baseType}}">{{baseType}}</a>)
                                {{/baseType}}
                            </span>
                        </td>
                        <td>
                            <p class="marked">{{defaultValue}}</p>
                        </td>
                    </tr>
                {{/allParams}}
            </table>

            <h4 class="section-heading">Responses</h4>

            <table class="table table-hover">
                <colgroup>
                    <col style="width: 15%;"/>
                    <col style="width: 70%;"/>
                    <col style="width: 15%;"/>
                </colgroup>
                <thead>
                <tr class="active">
                    <th>HTTP Code</th>
                    <th>Description</th>
                    <th>Schema</th>
                </tr>
                </thead>
                <tbody>
                {{#responses}}
                    <tr>
                        <td class="parameter"><p class="marked">{{code}}</p></td>
                        <td class="parameter"><p class="marked">{{message}}</p></td>
                        <td class="parameter">
                            <span class="parameter">
                                {{#baseType}}
                                    <a href="#!/models#{{baseType}}">{{baseType}}</a>
                                {{/baseType}}
                                {{^baseType}}
                                    {{dataType}}
                                {{/baseType}}
                            </span>
                        </td>
                    </tr>
                {{/responses}}
                </tbody>
            </table>
        {{/operation}}
    {{/operations}}
</div>
